package greendao.gen;

import java.util.Map;

import org.greenrobot.greendao.AbstractDao;
import org.greenrobot.greendao.AbstractDaoSession;
import org.greenrobot.greendao.database.Database;
import org.greenrobot.greendao.identityscope.IdentityScopeType;
import org.greenrobot.greendao.internal.DaoConfig;

import com.example.ningyuwen.music.model.entity.customize.SongListInfo;
import com.example.ningyuwen.music.model.entity.music.MusicBasicInfo;
import com.example.ningyuwen.music.model.entity.music.MusicRecordInfo;

import greendao.gen.SongListInfoDao;
import greendao.gen.MusicBasicInfoDao;
import greendao.gen.MusicRecordInfoDao;

// THIS CODE IS GENERATED BY greenDAO, DO NOT EDIT.

/**
 * {@inheritDoc}
 * 
 * @see org.greenrobot.greendao.AbstractDaoSession
 */
public class DaoSession extends AbstractDaoSession {

    private final DaoConfig songListInfoDaoConfig;
    private final DaoConfig musicBasicInfoDaoConfig;
    private final DaoConfig musicRecordInfoDaoConfig;

    private final SongListInfoDao songListInfoDao;
    private final MusicBasicInfoDao musicBasicInfoDao;
    private final MusicRecordInfoDao musicRecordInfoDao;

    public DaoSession(Database db, IdentityScopeType type, Map<Class<? extends AbstractDao<?, ?>>, DaoConfig>
            daoConfigMap) {
        super(db);

        songListInfoDaoConfig = daoConfigMap.get(SongListInfoDao.class).clone();
        songListInfoDaoConfig.initIdentityScope(type);

        musicBasicInfoDaoConfig = daoConfigMap.get(MusicBasicInfoDao.class).clone();
        musicBasicInfoDaoConfig.initIdentityScope(type);

        musicRecordInfoDaoConfig = daoConfigMap.get(MusicRecordInfoDao.class).clone();
        musicRecordInfoDaoConfig.initIdentityScope(type);

        songListInfoDao = new SongListInfoDao(songListInfoDaoConfig, this);
        musicBasicInfoDao = new MusicBasicInfoDao(musicBasicInfoDaoConfig, this);
        musicRecordInfoDao = new MusicRecordInfoDao(musicRecordInfoDaoConfig, this);

        registerDao(SongListInfo.class, songListInfoDao);
        registerDao(MusicBasicInfo.class, musicBasicInfoDao);
        registerDao(MusicRecordInfo.class, musicRecordInfoDao);
    }
    
    public void clear() {
        songListInfoDaoConfig.clearIdentityScope();
        musicBasicInfoDaoConfig.clearIdentityScope();
        musicRecordInfoDaoConfig.clearIdentityScope();
    }

    public SongListInfoDao getSongListInfoDao() {
        return songListInfoDao;
    }

    public MusicBasicInfoDao getMusicBasicInfoDao() {
        return musicBasicInfoDao;
    }

    public MusicRecordInfoDao getMusicRecordInfoDao() {
        return musicRecordInfoDao;
    }

}
